﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security.Principal;

namespace StonePonyMVC.StonePony.Classes
{
    public class CurrentUser : IPrincipal
    {
        #region IPrincipal Members

        public IIdentity Identity { get; private set; }

        public bool IsInRole(string role)
        {
            return ((StonePonyIdentity)this.Identity).IsInRole(role);
        }

        #endregion

        public CurrentUser(StonePonyIdentity identity)
        {
            this.Identity = identity;
        }
    }
}